/**
 * @(#)ISystemProcessHistoryService.java 2009-11-27
 *   
 * Copyright  (c) 2009-2010 Wilmar IT Service,  Inc.   
 * All  rights  reserved.   
 * TODO
 */

package com.wilmar.process.core.services.api;

import java.util.List;

import org.jbpm.api.history.HistoryProcessInstance;

import com.wilmar.process.entity.User;
import com.wilmar.process.entity.query.HistoryProcessInstanceQueryObject;
import com.wilmar.process.entity.vo.HistoryProcessInstanceVO;
import com.wilmar.process.exception.ObjectNotFoundException;

/**
 * 系统流程历史服务接口
 * 
 * @author asus Email:zhoulibo_java@msn.cn
 * @version 1.0.0
 */

public interface ISystemHistoryProcessInstanceService extends
		IBaseService<HistoryProcessInstanceVO, HistoryProcessInstance> {

	/**
	 * 获取用户发起的所有流程实例
	 * 
	 * @param user
	 *            用户
	 * @param prototype
	 *            分页以及条件信息
	 * @return 流程实例列表
	 */
	public List<HistoryProcessInstanceVO> getListUsersCommitedProcessInstance(
			User user, HistoryProcessInstanceQueryObject prototype);
	
	/**
	 * 根据历史流程实例编号找到对应的历史流程实例实体
	 * 
	 * @param processInstanceId 历史流程实例编号
	 * @return 历史流程实例实体
	 * @throws ObjectNotFoundException 当历史流程实例编号没有对应的历史流程实体时
	 */
	public HistoryProcessInstance getDetailById(String processInstanceId) throws ObjectNotFoundException;
}
